﻿using LimaLims.Core.Enum;
using Microsoft.EntityFrameworkCore;

namespace LimaLims.Core.Entity.TestCenter
{
    /// <summary>
    /// 不良品处理
    /// </summary>
    [Comment("不良品处理")]
    public class RejectDeal : DEntityTenant
    {
        /// <summary>
        /// 不良品处理单编号
        /// </summary>
        [Comment("不良品处理单编号")]
        public string Code { get; set; }

        /// <summary>
        /// 试验任务ID
        /// </summary>
        [Comment("试验任务ID")]
        public long ExperimentTaskId { get; set; }

        public ExperimentTask ExperimentTask { get; set; }

        /// <summary>
        /// 是否需要MRB评审
        /// </summary>
        [Comment("是否需要MRB评审")]
        public bool? IsMRBAdvice { get; set; }

        /// <summary>
        /// 不良品处理建议
        /// </summary>
        [Comment("不良品处理建议")]
        public string RejectAdvice { get; set; }

        /// <summary>
        /// MRB评审建议
        /// </summary>
        [Comment("MRB评审建议")]
        public string MRBAdvice { get; set; }

        /// <summary>
        /// 最终判定结果
        /// </summary>
        [Comment("最终判定结果")]
        public string Result { get; set; }

        /// <summary>
        /// 不良品处理单状态
        /// </summary>
        [Comment("不良品处理单状态")]
        public RejectDealStatus Status { get; set; }

        /// <summary>
        /// 处理时间
        /// </summary>
        [Comment("处理时间")]
        public DateTime? DealTime { get; set; }

        /// <summary>
        /// 处理人
        /// </summary>
        [Comment("处理人")]
        public string DealUser { get; set; }

        /// <summary>
        /// 不良品原因记录
        /// </summary>
        public ICollection<RejectItem> RejectItems { get; set; }
    }
}
